Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix types in JSDoc #9

Merged
merged 2 commits into from
Jan 5, 2025
Merged

Conversation

szepeviktor
Copy link
Contributor

@szepeviktor szepeviktor commented Dec 1, 2024

tsconfig.json

{
  "compilerOptions": {
    "target": "es2017",
    "module": "es6",
    "allowJs": true,
    "checkJs": true,
    "noEmit": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "skipLibCheck": true
  }
}
yarn add typescript
yarn run tsc

@@ -4,7 +4,6 @@ export default class Cookie
* Make a new Cookie instance.
*
* @param {string} namespace
* @return {void}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No return tag for constructor.

Comment on lines -46 to +49
* @param {mixed} value
* @return {mixed}
* @param {*} value
* @return {*}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PHP: mixed
JS: *

Comment on lines -81 to +83
this.set(key, null, 'Thu, 01 Jan 1970 00:00:01 GMT');
this.set(key, '', 'Thu, 01 Jan 1970 00:00:01 GMT');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

null is not compatible with string

Comment on lines +36 to +37
/** @type {string[]} */
const initialValue = [];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sets the type for the empty array.

@szepeviktor
Copy link
Contributor Author

@adamlaki This is not a business PR but a scientific PR 👺

@szepeviktor
Copy link
Contributor Author

szepeviktor commented Jan 3, 2025

@adamlaki This is black tar. ⚫ We should close it.

@adamlaki
Copy link
Member

adamlaki commented Jan 4, 2025

@iamgergo Gergő, please take a look at this, too!

@iamgergo
Copy link
Member

iamgergo commented Jan 4, 2025

@szepeviktor Can you resolve the conflicts please?

@szepeviktor
Copy link
Contributor Author

Done 🍏

This is not really a PR but won't do much damage.

@iamgergo iamgergo merged commit 1941743 into conedevelopment:master Jan 5, 2025
@szepeviktor szepeviktor deleted the patch-1 branch January 5, 2025 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants